<?php defined('SYSPATH') or die('No direct script access.') ?>
      <!-- Fixed navbar -->
      <div class="navbar navbar-default navbar-fixed-top">
        <div class="container">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
			  <a class="navbar-brand" href="<?php echo URL::site('book/orders') ?>">Управление заказами</a>
          </div>
          <div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<?php
if($user->username == 'root'){
?>
	<li><?php echo Form::button('balance', 'Баланс пользователей', array('rel'=>URL::site('book/balance'), 'style'=>'margin:10px','class'=>'btn btn-sm btn-'.($user->balance<0?'danger':'success'))) ?></li>
<?php
}
else {
?>
	<li><?php echo Form::button('balance', 'Ваш баланс: '.$user->balance.'<span class="rouble">Р</span>',array('rel'=>URL::site('book/balance'), 'style'=>'margin:10px','class'=>'btn btn-sm btn-'.($user->balance<0?'danger':'success'))) ?></li>
<?php
}
?>
	<li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $user->username ?> <b class="caret"></b></a>
        <ul class="dropdown-menu">
          <li><?php echo HTML::anchor('logout', '<span class="glyphicon glyphicon-log-out"></span> Выйти') ?></li>
          <li><?php echo HTML::anchor('profile', '<span class="glyphicon glyphicon-user"></span> Профайл') ?></li>
          <li><?php echo HTML::anchor('settings', '<span class="glyphicon glyphicon-cog"></span> Настройки') ?></li>
        </ul>
      </li>
    </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>

      <!-- Begin page content -->
      <div id="container_body" class="container">